home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
I-Z
/
Lex.cpt
/
Lex
/
asu124.lxi
< prev
next >
Wrap
Text File
|
1990-06-14
|
503b
|
32 lines
/* example from ASU p.124 */
a = [a];
b = [b];
c = [c];
d = [d];
r = (a|b|c|d)* a b b;
%{
#include <stdlib.h>
#ifdef THINK_C
#include <CONSOLE.H>
#endif
#define _lmovb _lmovb_debug
extern SHORTINT _lmovb_debug();
main()
{
int token_number;
#ifdef THINK_C
cecho2file("asu124.log",0, stdout);
#endif
while(token_number = yylex())
printf("\nyylex returns %d\n", token_number);
printf("\nyylex returns NULL\n");
}
%}
%%
r {
printf((char *)"\nrecognized r\n");
return 1;
}
%%
void yyinit() {}